#pragma once

#include <iostream>
#include <string>
using namespace std;

#include "ClassRegister.h"


class A : public ClassObject
{
  public:
    string m_name;
    int    m_age;

  public:
    A() : m_name(""), m_age(0) {}

    void show()
    {
        std::cout << "name=" << m_name << ",age=" << m_age << std::endl;
    }

    void testfun1(int i)
    {
        std::cout << "类方法反射1 : " << i << std::endl;
    }

    void testfun2(int i)
    {
        std::cout << "类方法反射2 : " << i << std::endl;
    }
};

REGISTER_CLASS(A);
REGISTER_CLASS_FIELD(A, m_name, string);
REGISTER_CLASS_FIELD(A, m_age, int);
REGISTER_CLASS_METHOD(A, testfun1);
REGISTER_CLASS_METHOD(A, testfun2);